package com.liu.efk.zdcq.task;

import com.liu.efk.zdcq.pojo.Task;
import com.liu.efk.zdcq.sevice.CollectService;
import com.liu.efk.zdcq.socket.WebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.Map;



/**
 * Created by shi860715@126.com
 * Date 2021/5/20 13:07
 * Description
 */

@Component
public class CronTask {

    @Autowired
    WebSocket webSocket;

    @Autowired
    CollectService collectService;

//    @Scheduled(cron = "0/2 * * * * ?")
    public void dotaskTest(){

      Map<String, Task>  entries = webSocket.getTask();

      for(String key :entries.keySet()){
          System.out.println(new Date()+"--"+key);
      }





    }


}
